define(function(require, exports, module) {

    var axios = require('lib/axios/index.js');

    var VueComponent = new Vue({
        el: '#app',
        data: {
            tableList: [

            ],
            form: {
                UserNo: '',
                UserName: '',
                LoginName: '',
                MobliePhone: '',
                DataFlag: ''
            },
            enums: {
                DataFlag: []
            }
        },
        mounted: function() {
            var thisVue = this;

            thisVue.tableSearch();

            thisVue.bindSelect();

        },
        methods: {

            tableSearch: function () {
                var thisVue = this;
                var tools = require('lib/tools.js');
                var queryString = tools.getQueryString.call(thisVue.form);


                var url = baseSiteUrl + "Common/Query";
                if (queryString != "") {
                    url = url + "?" + queryString;
                }

                axios.get(url)
                    .then(function (response) {
                        thisVue.tableList = response.data.ResultList;
                        console.log(response.data);
                        console.log(response.status);
                        console.log(response.statusText);
                        console.log(response.headers);
                        console.log(response.config);
                    });
            },
            bindSelect: function () {
                var thisVue = this;
                var url = baseSiteUrl+"USER/EnumConvert2";
                axios.get(url)
                    .then(function (response) {
                        thisVue.enums.DataFlag = response.data;
                    });

             },

            handleEditClick: function(row) {
               
                row = row || {
                    id: 0,
                };


                layer.open({
                    type: '2',
                    content: 'http://www.baidu.com'
                });

                // var config = {
                //     url: 'userEdit.html' + "?id=" + row.id,
                //     menuName: row.shortName + "-配置"
                // };
                // this.openWin(config);
            }

        }

    });

});